//package com.many.common.interceptor;
//
//import com.many.common.constants.Constant;
//import org.springframework.web.servlet.HandlerInterceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//
///**
// * @ClassName LoginInterceptor
// * @Description TODD
// * @Author James
// * @Date 2022/8/1
// * @Version 1.0
// **/
//public class LoginInterceptor implements HandlerInterceptor {
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        HttpSession httpSession = request.getSession(false);
//        if(httpSession != null && httpSession.getAttribute(Constant.USER_SESSION_KEY) != null) {
//            return true;
//        }
//        response.sendRedirect("/login.html");
//        return false;
//    }
//
//}
